let a  = "6 9\n" +
    "1 2 1\n" +
    "1 3 12\n" +
    "2 3 9\n" +
    "2 4 3\n" +
    "3 5 5\n" +
    "4 3 4\n" +
    "4 5 13\n" +
    "4 6 15\n" +
    "5 6 4";
console.log(a)